<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: DELL
  Date: 2020/12/27
  Time: 15:26
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>修改推文</title>
    <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css">
    <script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>
    <script src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
    <script type="text/javascript" src="../js/index.js"></script>
    <script src="${pageContext.request.contextPath}/jsp/ckeditor/ckeditor.js" type="text/javascript" ></script>
</head>
<% String path = request.getContextPath();%>
<body>
<form align="center" action="<%=path%>/updateEssay" method="post">
    <label>文章id</label>
    <input name="id" type="text" value="${essay.essay_Id}" readonly="readonly"><br><br>
    <label>标题</label>
    <input name="title" type="text" value="${essay.essay_title}"><br><br>
    <label>作者</label>
    <input name="author" type="text" value="${essay.essay_author}"><br><br>
    <label>正文</label>
    <textarea id="content" name="content">
        ${essay.essay_content}
    </textarea><br><br>
    <label>上传时间</label>
    <input name="time" type="text" value="${essay.essay_time}" readonly="readonly"><br><br>
    <label>分类</label>
    <input name="type" type="text" value="${essay.essay_type}"><br><br>
    <input type="submit" value="提交修改">
</form>
<script type="text/javascript">
    CKEDITOR.replace('content',  {
        customConfig: '${pageContext.request.contextPath}/jsp/ckeditor/config.js',
        //清空预览区域显示内容
        image_previewText : "",
        //图片上传
        filebrowserUploadUrl : '${pageContext.request.contextPath}/img?',
    } );
</script>
</body>
</html>
